﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UniversaleMain.Master" AutoEventWireup="true" CodeBehind="addNewProduct.aspx.cs" Inherits="FYPDemo.WebForm7" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 <style type="text/css">
    .style1
    {
        width: 150px;
    }
    #TextArea1
     {
         width: 315px;
     }
     #TaDescription
     {
         width: 270px;
     }
     #textArea1
     {
         width: 255px;
     }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 class="h1_title">New Product</h1>
<p>
        <table style="width: 100%;">
            <tr>
                <td colspan="2">
                    <asp:Label ID="Label1" runat="server" Text="Insert Product:"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="lblPicture" runat="server" Text="Picture:"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td>
&nbsp;<asp:Image ID="ImgUpload" runat="server" Height="250px" Width="205px" />
                    <br />
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                    <br />
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btnUpload" runat="server" onclick="btnUpload_Click" 
                        Text="Upload" Width="73px" />
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label4" runat="server" Text="Product Name:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbProdName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ErrorMessage="Product Name must not be empty" ControlToValidate="tbProdName" 
                    ForeColor="Red" ValidationGroup="checkValidation"></asp:RequiredFieldValidator>
                </td>
            </tr>            
            <tr>
                <td class="style1">
                    <asp:Label ID="lblCategory" runat="server" Text="Categories:"></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlCategory" runat="server"></asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label3" runat="server" Text="Prices:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbPrices" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ErrorMessage="Price must not be empty" ControlToValidate="tbPrices" 
                    ForeColor="Red" ValidationGroup="checkValidation"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label7" runat="server" Text="Actual Cost:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbCost" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                    ErrorMessage="Cost must not be empty" ControlToValidate="tbCost" 
                    ForeColor="Red" ValidationGroup="checkValidation"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label6" runat="server" Text="Quantity:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbProdQuantity" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                    ErrorMessage="Quantity must not be empty" ControlToValidate="tbProdQuantity" 
                    ForeColor="Red" ValidationGroup="checkValidation" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ErrorMessage="Quantity must be integer" ValidationExpression="(^\d+$)"
                     ValidationGroup="checkValidation" ControlToValidate="tbProdQuantity" ForeColor="Red" 
                    Display="Dynamic"></asp:RegularExpressionValidator> 
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label9" runat="server" Text="Safe Level:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbSafeLevel" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ErrorMessage="Safe level must be integer" ValidationExpression="(^\d+$)"
                     ValidationGroup="checkValidation" ControlToValidate="tbSafeLevel" ForeColor="Red" 
                    Display="Dynamic"></asp:RegularExpressionValidator>                    
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="Label8" runat="server" Text="Description:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="textArea1" runat="server" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    &nbsp;</td>
                <td>
&nbsp;<asp:Button ID="btnAddproduct" runat="server" Text="Add" Width="67px" onclick="btnAddproduct_Click" 
                        ValidationGroup="checkValidation" CssClass="buttonbg" />
                </td>
            </tr>
        </table>
</p>
</asp:Content>
